package com.comdev.ctrls;

import com.comdev.common.Reps;
import com.comdev.exceptions.CommonOut;
import com.comdev.init.TableGernerate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

/**
 * User: zhu
 * Date: 13-10-22
 * Time: 上午12:05
 */
@Controller
@RequestMapping("tableinit")
public class tableinit
{

    @ResponseBody
    @RequestMapping("/")
    public Map init()
    {
        Map out = new HashMap<String, String>();
        try
        {
            TableGernerate  tableGernerate=new TableGernerate();
            tableGernerate.test();
        } catch (CommonOut e)
        {
            Reps.add(out, e);
            return out;
        } catch (Exception e)
        {
            Reps.add(out, e);
            return out;
        }
        Reps.success(out);
        return out;
    }

}
